Population class extension: analytics module

The class extension for the population object that contains analytics functionality

class binarycpython.utils.population_extensions.analytics.analytics(**kwargs)[source]

Bases: object

Extension for the Population class containing the functions for analytics

CPU_time()[source]

Function to return how much CPU time we’ve used

make_analytics_dict()[source]

Function to create the analytics dictionary

set_time(when)[source]

Function to set the timestamp at when, where when is ‘start’ or ‘end’.

If when == end, we also calculate the time elapsed.

time_elapsed(force=False)[source]

Function to return how long a population object has been running.

We return the cached value if it’s available, and calculate the time elapsed if otherwise or if force is True